import axios from '@/utils/request'
const base = '/userserver'

export function saveRoom(data) {
  return axios({
    url: `${base}/rooms`,
    method: 'post',
    data
  })
}

export function listRoom(params) {
  return axios({
    url: `${base}/rooms`,
    method: 'get',
    params: params
  })
}

export function deleteRoom(id) {
  return axios({
    url: `${base}/rooms/` + id,
    method: 'delete'
  })
}

export function modifyRoom(id, data) {
  return axios({
    url: `${base}/rooms/` + id,
    method: 'put',
    data
  })
}
